/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication6.DomainLayer;

/**
 *
 * @author meydlo
 */
public class StatisticsOfCompany {

    private int sellProducts;
    private int rentProducts;
    private int customers;
    private int workers;
    private long orders;
    private double moneyFromSell;
    private double moneyFromRent;
    private double extraMoney;
    private double total;

    private static StatisticsOfCompany statisticsOfCompany;


    private StatisticsOfCompany(){
        orders=0;
        moneyFromSell=0;
        moneyFromRent=0;
        extraMoney=0;
        total=0;
    }


   //
    public static StatisticsOfCompany getStatisticsOfCompany(){
        if(statisticsOfCompany==null){
            statisticsOfCompany=new StatisticsOfCompany();
        }
        return statisticsOfCompany;
    }


    public double getExtraMoney() {
        return extraMoney;
    }

    public void setExtraMoney(double extraMoney) {
        this.extraMoney+= extraMoney;
    }

    public double getMoneyFromRent() {
        return moneyFromRent;
    }

    public void setMoneyFromRent(double moneyFromRent) {
        this.moneyFromRent+= moneyFromRent;
    }

    public double getMoneyFromSell() {
        return moneyFromSell;
    }

    public void setMoneyFromSell(double moneyFromSell) {
        this.moneyFromSell+= moneyFromSell;
    }

    public long getOrders() {
        return orders;
    }

    public void setOrders(long orders) {
        this.orders+= orders;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public double getTotal(){
        total=moneyFromRent+moneyFromSell+extraMoney;;
        return total;
    }


    public int getCustomers()
    {
        CustomerRecords customerRecords=CustomerRecords.getCustomerRecords();
        customers=customerRecords.getNoOfCustomers();
        return customers;
        
    }

    public int getWorkers()
    {
        WorkerRecords workerRecords=WorkerRecords.getWorkerRecords();
        workers=workerRecords.getNoOfWorkers();
        return workers;
    }

    public int getSellProduct()
    {
        SellRecords sellRecords=SellRecords.getSellRecords();
        sellProducts=sellRecords.getNoOfSellProducts();
        return sellProducts;
    }

    public int setProducts()
    {  
        RentRecords rentRecords=RentRecords.getRentRecords();
        rentProducts=rentRecords.getNoOfRentProducts();
        return rentProducts;
    }
}
